package com.squirrel.common.response.page;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Description
 * @Author 关远键
 * @Version v1.0.0
 * @Date 2021/11/14 15:26
 */
@Data
@Accessors(chain = true)
@ApiModel("分页")
public class PageResult<T> {

    @ApiModelProperty("总数")
    private Integer total;

    @ApiModelProperty("记录")
    private List<T> rows;

    public PageResult(Integer total, List<T> rows){
        this.total = total;
        this.rows = rows;
    }

}
